package com.yidao.user.domain;

import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.yidao.core.domain.BaseDomainObject;

@Entity
@Table(name="users")
public class User extends BaseDomainObject{
	
	private static final long serialVersionUID = 1L;

	private String username;
	
	private String password;
	
	private String fullName;
	
	private String gender;

	private Date birthday;

	private String email;
	
	public User() {
		super();
	}

	@Column
	public Date getBirthday() {
		return birthday;
	}

	@Column(length=50)
	public String getEmail() {
		return email;
	}

	@Column(length=50)
	public String getFullName() {
		return fullName;
	}
	
	@Column
	public String getGender() {
		return gender;
	}
	
	@Column(length=50)
	public String getPassword() {
		return password;
	}
	
	@Column(length=50,nullable=false)
	public String getUsername() {
		return username;
	}
	
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}
